home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / tusrc.zip / MAKEFILE.IN < prev    next >
Text File  |  1993-09-18  |  5KB  |  146 lines

  1. # Master Makefile for the GNU text utilities.
  2. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. # If you use gcc, you should either run the fixincludes script that
  24. # comes with it or else use gcc with the -traditional option.  Otherwise
  25. # ioctl calls will be compiled incorrectly on some systems.
  26. CC = @CC@
  27. AR = ar
  28. # Set RANLIB = echo if your system doesn't have or need ranlib.
  29. RANLIB = @RANLIB@
  30. # Use cp if you don't have install.
  31. INSTALL = @INSTALL@
  32. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  33. INSTALL_DATA = @INSTALL_DATA@
  34.  
  35. # Things you might add to DEFS:
  36. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  37. # -DHAVE_UNISTD_H    If you have unistd.h.
  38. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  39. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  40. # -DHAVE_FCNTL_H    If not POSIX.1 but you have fcntl.h.
  41. # -DHAVE_ST_BLKSIZE    If your `struct stat' has st_blksize.
  42. # -DRETSIGTYPE=int    If your signal handlers return int, not void.
  43. # -DHAVE_STRERROR    If you have strerror function.
  44. # -DHAVE_VPRINTF    If you have vprintf function.
  45. # -DHAVE_DOPRNT        If you have _doprnt function (but lack vprintf).
  46.  
  47. DEFS = @DEFS@
  48. LIBS = @LIBS@
  49.  
  50. CFLAGS = @CFLAGS@
  51. LDFLAGS = @LDFLAGS@
  52.  
  53. prefix = /usr/local
  54. exec_prefix = $(prefix)
  55.  
  56. # Prefix for each installed program, normally empty or `g'.
  57. binprefix = 
  58. # Prefix for each installed man page, normally empty or `g'.
  59. manprefix = 
  60.  
  61. # Where to install the executables.
  62. bindir = $(exec_prefix)/bin
  63.  
  64. # Where to install the manual pages.
  65. mandir = $(prefix)/man/man1
  66. # Extension (not including `.') for the installed manual page filenames.
  67. manext = 1
  68.  
  69. #### End of system configuration section. ####
  70.  
  71. SHELL = /bin/sh
  72.  
  73. MDEFINES = bindir='$(bindir)' mandir='$(mandir)' \
  74. manext='$(manext)' binprefix='$(binprefix)' manprefix='$(manprefix)' \
  75. LIBS='$(LIBS)' LIBPROGS='$(LIBPROGS)' \
  76. AR='$(AR)' RANLIB='$(RANLIB)' INSTALL_PROGRAM='$(INSTALL_PROGRAM)' \
  77. INSTALL_DATA='$(INSTALL_DATA)' DEFS='$(DEFS)' \
  78. CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' CC='$(CC)'
  79.  
  80. DISTFILES = COPYING COPYING.LIB ChangeLog Makefile.in README INSTALL \
  81. NEWS configure configure.in mkinstalldirs
  82.  
  83. # Redundant stuff for making only selected programs.
  84. PROGS = cat cksum comm csplit cut expand fold head join nl od \
  85. paste pr sort split sum tac tail tr unexpand uniq wc
  86.  
  87. # Subdirectories to run make in for the primary targets.
  88. SUBDIRS = lib src man
  89.  
  90. all:
  91.     for dir in $(SUBDIRS); do \
  92.       echo making $@ in $$dir ; \
  93.       (cd $$dir; $(MAKE) $(MDEFINES) $@) ; \
  94.     done
  95.  
  96. info:
  97. install-info:
  98. dvi:
  99.  
  100. check:
  101. installcheck:
  102.  
  103. $(PROGS):
  104.     cd lib; $(MAKE) $(MDEFINES) all
  105.     cd src; $(MAKE) $(MDEFINES) $@
  106.  
  107. Makefile: config.status $(srcdir)/Makefile.in $(srcdir)/lib/Makefile.in \
  108.         $(srcdir)/man/Makefile.in $(srcdir)/src/Makefile.in
  109.     $(SHELL) config.status
  110.  
  111. # Make sure all installation directories, e.g. $(bindir) actually exist by
  112. # making them if necessary.
  113. installdirs:
  114.     $(SHELL) $(srcdir)/mkinstalldirs \
  115.       $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  116.  
  117. install:: installdirs
  118.  
  119. install uninstall TAGS clean mostlyclean distclean realclean::
  120.     for dir in $(SUBDIRS); do \
  121.       echo making $@ in $$dir ; \
  122.       (cd $$dir; $(MAKE) $(MDEFINES) $@) ; \
  123.     done
  124.  
  125. distclean realclean::
  126.     rm -f Makefile config.status
  127.  
  128. ac_dir = /home/gd/gnu/autoconf
  129. dist: $(DISTFILES)
  130.     if [ -f $(ac_dir)/autoconf ]; then \
  131.       $(ac_dir)/autoconf --macrodir=$(ac_dir); \
  132.     else :; fi
  133.     echo textutils-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q src/version.c` > .fname
  134.     rm -rf `cat .fname`
  135.     mkdir `cat .fname`
  136.     ln $(DISTFILES) `cat .fname`
  137.     for dir in $(SUBDIRS); do \
  138.       mkdir `cat .fname`/$$dir; \
  139.       (cd $$dir; $(MAKE) $@); \
  140.     done
  141.     tar chzf `cat .fname`.tar.z `cat .fname`
  142.     rm -rf `cat .fname` .fname
  143.  
  144. # Prevent GNU make v3 from overflowing arg limit on SysV.
  145. .NOEXPORT:
  146.